package com.mall.service.impl;

import com.mall.dao.IAddressDao;
import com.mall.domain.Address;
import com.mall.service.IAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("addressService")
public class AddressServiceImpl implements IAddressService {
	@Autowired
	private IAddressDao addressDao;

	@Override
	public List<Address> findAllAddress() {
		return addressDao.findAllAddress();
	}

	@Override
	public List<Address> findAddressById(Integer id) {
		return addressDao.findAddressById(id);
	}

	//	修改地址
	@Override
	public Integer updateAddress(Address address){
		return addressDao.updateAddress(address);
	}

	@Override
	public Integer deleteAddress(Integer id) {
		return addressDao.deleteAddress(id);
	}

	//增加地址
	@Override
	public Integer addAddress(Address address) {
		return addressDao.addAddress(address);
	}
}
